// 导入 path 模块
const path = require( 'path' );

let pathname ;

pathname = path.join( 'D:/' , '/kaifamiao' , '/codes' , '/nodejs' );
console.log( pathname );
console.log( path.isAbsolute( pathname ) );

pathname = path.join( '..' , './file-system' );
console.log( pathname );
console.log( path.isAbsolute( pathname ) );

pathname = path.resolve( 'D:/' , 'kaifamiao' , 'codes' , 'nodejs' );
console.log( pathname );
console.log( path.isAbsolute( pathname ) );

pathname = path.resolve( '.' );
console.log( pathname );
console.log( path.isAbsolute( pathname ) );

pathname = path.resolve( '.' , '../file-system' );
console.log( pathname );
console.log( path.isAbsolute( pathname ) );